export interface BasicUser {
  email?: string;
  username: string;
  name?: string;
  avatar?: string;
  password?: string;
  repeat_password?: string;
}

export interface GoogleUser extends BasicUser {
  id: string;
  verified_email: boolean;
  given_name: string;
  family_name: string;
  picture: string;
  locale: string;
}

export interface GithubUser extends BasicUser {
  login: string;
  id: number;
  node_id: string;
  avatar_url: string;
  gravatar_id: string;
  name: string;
  company: string;
  blog: string;
  bio: string;
  followers: number;
  following: number;
  location: string;
  hireable: boolean;
  two_factor_authentication: boolean;
}

export interface WechatUser extends BasicUser{
  access_token: string;
  expires_in: string;
  refresh_token: string;
  openid: string;
  scope: string;
  appid: string;
  nickname?: string;
  gender?: number;         //sex
  province?: string;
  city?: string;
  country?: string;
  avatar_url?: string;     //headimgurl
  privilege?: string;
  unionid?: string;
}

export type UctooUser = BasicUser | GoogleUser | GithubUser | WechatUser;
